package com.tx.constant;

public enum ResultCode {
    //统一的成功请求----success request
    OK(1000, "请求成功"),

    //统一的无效请求----error request
    ERROR(2000, "错误请求"),
    INPUT_PARAMETERS(2001, "入参错误"),
    NO_AUTH(2002, "无权限访问");

    private int code;

    private String msg;

    ResultCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    ResultCode(int code) {
        this.code = code;
    }

    public int getCode() {
        return this.code;
    }

    public String getMsg() {
        return this.msg;
    }
}
